First we need to import the necessary modules.

In [1]:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import random
from beeswarm import beeswarm
from mpl_toolkits.mplot3d import Axes3D
from scipy.stats import ttest_ind
from matplotlib.patches import Ellipse,Patch,Arrow
from IPython.display import set_matplotlib_formats
set_matplotlib_formats('png')
from IPython.display import HTML, display
import tabulate
from decimal import Decimal
import warnings
warnings.filterwarnings('ignore') #in order to suppress warnings output of t-test if one sample is 0
pd.set_option('display.max_rows', 1000)

The we read sample files and extract separate data containers for the 4 tissues in question. The data have been normalized.

In [2]:
sampleinfo=pd.read_csv('sample_info_consensus.csv',sep=',')
sampleinfo=sampleinfo.query('paper == "fromm" or paper == "schee" or paper == "selitsky" or paper == "neerincx"')
countmat=pd.read_csv('consensus.rpm_uniq_seqs_correct_names.csv',sep=',')
countmat.rename(columns = {'Unnamed: 0':'mirna'}, inplace = True)
liver_normal=countmat[[row[0] for row in sampleinfo.values if row[3]=='liver' and row[2]=='normal']]
liver_meta=countmat[[row[0] for row in sampleinfo.values if row[3]=='liver' and row[2]=='metastasis']]
crc_normal=countmat[[row[0] for row in sampleinfo.values if row[3]=='colorect' and row[2]=='normal' and row[4]!='schee']]
crc_tumor=countmat[[row[0] for row in sampleinfo.values if row[3]=='colorect' and row[2]=='tumor']]
liver_normal.index=liver_meta.index=crc_normal.index=crc_tumor.index=list(countmat['mirna'])

For each miRNA, certain values are calculated such as t-test relevance values between different tissue types, fold changes between average values and count of samples. This is later used to filter the data. Also, miRNAs that are known to be tissue-related are excluded.

In [3]:
mirnanamelist=[]
mirnadatalist=[]
tissuemirna=["Hsa-Mir-122_5p ","Hsa-Mir-126_5p ","Hsa-Mir-126_3p ","Hsa-Mir-144_5p ","Hsa-Mir-144_3p ","Hsa-Mir-486_5p ",
             "Hsa-Mir-143_3p ","Hsa-Mir-145_5p ","Hsa-Mir-150_5p ","Hsa-Mir-142-P1_5p ","Hsa-Mir-223_3p "]
for i in range(len(countmat.values)):
    s1,p1=ttest_ind(crc_normal.values[i],crc_tumor.values[i])
    s2,p2=ttest_ind(crc_tumor.values[i],liver_meta.values[i])
    s3,p3=ttest_ind(crc_normal.values[i],liver_normal.values[i])
    s4,p4=ttest_ind(liver_meta.values[i],liver_normal.values[i])
    fc_cm_cb=np.mean(crc_tumor.values[i])/np.mean(crc_normal.values[i])
    if fc_cm_cb<1:fc_cm_cb=-1/(fc_cm_cb+0.00001)
    fc_lm_cm=np.mean(liver_meta.values[i])/np.mean(crc_tumor.values[i])
    if fc_lm_cm<1:fc_lm_cm=-1/(fc_lm_cm+0.00001)
    fc_lb_cb=np.mean(liver_normal.values[i])/np.mean(crc_normal.values[i])
    if fc_lb_cb<1:fc_lb_cb=-1/(fc_lb_cb+0.00001)
    fc_lb_lm=np.mean(liver_normal.values[i])/np.mean(liver_meta.values[i])
    if fc_lb_lm<1:fc_lb_lm=-1/(fc_lb_lm+0.00001)
    n_cb=len(crc_normal.values[i])
    n_cm=len(crc_tumor.values[i])
    n_lb=len(liver_normal.values[i])
    n_lm=len(liver_meta.values[i])
    totcounts=np.mean(liver_normal.values[i])+np.mean(liver_meta.values[i])+np.mean(crc_normal.values[i])+np.mean(crc_tumor.values[i])
    tm=False
    if countmat['mirna'][i] in tissuemirna:tm=True
    mirnadatalist.append([p1,p2,p3,p4,fc_cm_cb,fc_lm_cm,fc_lb_cb,fc_lb_lm,n_cb,n_cm,n_lb,n_lm,totcounts,tm])
    mirnanamelist.append(countmat['mirna'][i])
mirnalist=pd.DataFrame(data=mirnadatalist,index=mirnanamelist,columns=[ 
                                               'p_cm_cb',
                                               'p_cm_lm',
                                               'p_cb_lb',
                                               'p_lm_lb',
                                               'fc_cm_cb',
                                               'fc_lm_cm',
                                               'fc_lb_cb',
                                               'fc_lb_lm',
                                               'N_cb',
                                               'N_cm',
                                               'N_lb',
                                               'N_lm',
                                               'total_counts',
                                               'tissue_mirna'])

This is what it looks like for one example miRNA.

In [4]:
mirnalist.T['Hsa-Mir-122_5p ']
Out[4]:
p_cm_cb            0.227864
p_cm_lm         4.72873e-07
p_cb_lb         1.28378e-15
p_lm_lb         7.69653e-13
fc_cm_cb           -2.29099
fc_lm_cm            243.423
fc_lb_cb             4146.9
fc_lb_lm            39.0297
N_cb                     24
N_cm                    101
N_lb                     24
N_lm                     19
total_counts         140249
tissue_mirna           True
Name: Hsa-Mir-122_5p , dtype: object

Next we define the visualization function called "combplot". The individual experimental miRNA counts are drawn as vertical (liver) and horizontal (colon) lines. The area where they overlap is indicated by an ellipse with the means as center and the standard deviation as half axes. This is done both for benign and malign tissues.

The straight green line indicates the equal count where colon and liver counts are the same (FC=1). An arrow indicates the trend from benign to malign. If the ellipse is top left it means the expression for this miRNA is higher in the colon tissue than in the liver tissue while it is lower if the ellipse is in the bottom right.

Additionally, a classical box plot of the four tissues is shown and overlaid with a beeswarm plot that shows individual measurements.

One example plot is given.

In [5]:
def combplot(mirna):
    #prepare figure
    fig = plt.figure(figsize=(13,7))
    fig.suptitle(mirna,fontsize=20)
    #prepare ellipses subplot
    ax = fig.add_axes([0.1,0.1,0.44,0.44*13/7])
    plt.xlabel('Individual counts (liver)')
    plt.ylabel('Individual counts (colon)')
    plotlimitmax=max(liver_normal.T[mirna].max(),crc_normal.T[mirna].max(),liver_meta.T[mirna].max(),crc_tumor.T[mirna].max())
    plotlimitmin=min(liver_normal.T[mirna].min(),crc_normal.T[mirna].min(),liver_meta.T[mirna].min(),crc_tumor.T[mirna].min())
    ax.set_xlim(plotlimitmin, plotlimitmax)
    ax.set_ylim(plotlimitmin, plotlimitmax)
    #ax.set_aspect('equal')
    #prepare ellipses
    xn=liver_normal.T[mirna].mean()
    yn=crc_normal.T[mirna].mean()
    xerrn=2*liver_normal.T[mirna].std()
    yerrn=2*crc_normal.T[mirna].std()
    xc=liver_meta.T[mirna].mean()
    yc=crc_tumor.T[mirna].mean()
    xerrc=2*liver_meta.T[mirna].std()
    yerrc=2*crc_tumor.T[mirna].std()
    ne=Ellipse(xy=(xn,yn), width=xerrn, height=yerrn,color='blue',lw=2,fill=False,alpha=1,label='Benign (Median+St.d.)')
    ce=Ellipse(xy=(xc,yc), width=xerrc, height=yerrc,color='red',lw=2,fill=False,alpha=1,label='Malign (Media+St.d.)')
    ax.add_artist(ne)
    ax.add_artist(ce)
    ne.set_zorder(10000)
    ce.set_zorder(10000)
    #draw arrow between ellipses centers
    ar=Arrow(xn,yn,xc-xn,yc-yn,width=plotlimitmax/40,zorder=10001,color='purple')
    ax.add_artist(ar)
    #draw green line of constant fold change
    gfc1,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,1*plotlimitmax],'g',label="FC=1")
    gfc2,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,2*plotlimitmax],'g--',label="FC=2")
    gfc05,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,0.5*plotlimitmax],'g-.',label="FC=-2")
    #draw vertical and horizontal lines for each individual measurement
    lw,al=10,0.07
    nleg=Patch(color='black',alpha=al*5,label='Benign (ind. meas.)')
    cleg=Patch(color='yellow',alpha=al*5,label='Malign (ind. meas.)')
    ax.legend(handles=[ne,ce,nleg,cleg,gfc1,gfc2,gfc05],fontsize='small')
    for xln in liver_normal.T[mirna].values:
        ax.plot([xln,xln],[min(crc_normal.T[mirna].values),max(crc_normal.T[mirna].values)],'k-',linewidth=lw,alpha=al)
    for ycn in crc_normal.T[mirna].values:
        ax.plot([min(liver_normal.T[mirna].values),max(liver_normal.T[mirna].values)],[ycn,ycn],'k-',linewidth=lw,alpha=al)
    for xlc in liver_meta.T[mirna].values:
        ax.plot([xlc,xlc],[min(crc_tumor.T[mirna].values),max(crc_tumor.T[mirna].values)],'y-',linewidth=lw,alpha=al)
    for ycc in crc_tumor.T[mirna].values:
        ax.plot([min(liver_meta.T[mirna].values),max(liver_meta.T[mirna].values)],[ycc,ycc],'y-',linewidth=lw,alpha=al)
    #prepare subplot for boxplot and beeswarm plot
    ax2=fig.add_axes([0.61, 0.3, 0.35, 0.615])
    ax2.boxplot([crc_normal.T[mirna].values,
                crc_tumor.T[mirna].values,
                liver_meta.T[mirna].values,
                liver_normal.T[mirna].values],showmeans=True,meanline=True,
                labels=['Colon benign\n N='+str(int(mirnalist.T[mirna][8])),
                        'Colon malign\n N='+str(int(mirnalist.T[mirna][9])),
                       'Liver malign\n N='+str(int(mirnalist.T[mirna][11])),
                       'Liver benign\n N='+str(int(mirnalist.T[mirna][10]))])
    def GetColor(x):
        colors = []
        for item in x.index:
            coh=sampleinfo['paper'][sampleinfo['sample']==item].values[0]
            if coh == 'fromm': colors.append('red')
            if coh == 'schee':colors.append('blue')
            if coh == 'neerincx':colors.append('green')
            if coh == 'selitsky':colors.append('yellow')
        colors=np.array(colors)
        dat=x.values
        inds = dat.argsort()
        sorteddatcol = colors[inds]
        colors=sorteddatcol.tolist()
        return colors
    colors = (GetColor(crc_normal.T[mirna]) + GetColor(crc_tumor.T[mirna]) + GetColor(liver_meta.T[mirna]) + GetColor(liver_normal.T[mirna]))
    beeswarm([np.copy(crc_normal.T[mirna].values),
              np.copy(crc_tumor.T[mirna].values),
              np.copy(liver_meta.T[mirna].values),
              np.copy(liver_normal.T[mirna].values)],
              ax=ax2,s=10,alpha=0.4,col=colors,positions=[1,2,3,4])
    red_patch = Patch(color='red', label='Fromm')
    blue_patch =Patch(color='blue', label='Schee')
    green_patch = Patch(color='green', label='Neerincx')
    yellow_patch = Patch(color='yellow', label='Selitsky')
    ax2.legend(handles=[red_patch,blue_patch,green_patch,yellow_patch],fontsize='small')
    
    ax3=fig.add_axes([0.61, 0.1, 0.35, 0.14])
    ax3.plot([1,1,2,2],[4.5,4,4,4.5],'k')
    ax3.text(1.5,3,'FC = %.2f' % Decimal(str(mirnalist.T[mirna][4]))+', p = %.2e' % Decimal(str(mirnalist.T[mirna][0])),ha='center')
    ax3.plot([2,2,3,3],[2.5,2,2,2.5],'k')
    ax3.text(2.5,1,'FC = %.2f' % Decimal(str(mirnalist.T[mirna][5]))+', p = %.2e' % Decimal(str(mirnalist.T[mirna][1])),ha='center')
    ax3.plot([1,1,4,4],[0.5,0,0,0.5],'k')
    ax3.text(2.5,-1,'FC = %.2f' % Decimal(str(mirnalist.T[mirna][6]))+', p = %.2e' % Decimal(str(mirnalist.T[mirna][2])),ha='center')
    ax3.plot([3,3,4,4],[-1.5,-2,-2,-1.5],'k')
    ax3.text(3.5,-3,'FC = %.2f' % Decimal(str(mirnalist.T[mirna][7]))+', p = %.2e' % Decimal(str(mirnalist.T[mirna][3])),ha='center')
    ax3.set_xlim(0.6, 4.4)
    ax3.axis('off')
    
    plt.show()
combplot('Hsa-Mir-214_3p ')

Next comes a plot style where only the colon reads are shown.

In [6]:
def combplotcol(mirna):
    #prepare figure
    fig = plt.figure(figsize=(13,7))
    fig.suptitle(mirna,fontsize=20)
    #prepare ellipses subplot
    ax = fig.add_axes([0.1,0.1,0.44,0.44*13/7])
    plt.xlabel('Individual counts (colon benign)')
    plt.ylabel('Individual counts (colon malign)')
    plotlimitmax=max(crc_normal.T[mirna].max(),crc_tumor.T[mirna].max())
    plotlimitmin=min(crc_normal.T[mirna].min(),crc_tumor.T[mirna].min())
    ax.set_xlim(plotlimitmin, plotlimitmax)
    ax.set_ylim(plotlimitmin, plotlimitmax)
    #ax.set_aspect('equal')
    #prepare ellipses
    yn=crc_tumor.T[mirna].mean()
    xn=crc_normal.T[mirna].mean()
    yerrn=2*crc_tumor.T[mirna].std()
    xerrn=2*crc_normal.T[mirna].std()
    ne=Ellipse(xy=(xn,yn), width=xerrn, height=yerrn,color='blue',lw=2,fill=False,alpha=1,label='Median+St.d.')
    ax.add_artist(ne)
    ne.set_zorder(10000)
    #draw green line of constant fold change
    gfc1,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,1*plotlimitmax],'g',label="FC=1")
    gfc2,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,2*plotlimitmax],'g--',label="FC=2")
    gfc05,=ax.plot([plotlimitmin,plotlimitmax],[plotlimitmin,0.5*plotlimitmax],'g-.',label="FC=-2")
    #draw vertical and horizontal lines for each individual measurement
    lw,al=10,0.07
    nleg=Patch(color='black',alpha=al*5,label='ind. meas.')
    ax.legend(handles=[ne,nleg,gfc1,gfc2,gfc05],fontsize='small')
    for xln in crc_normal.T[mirna].values:
        ax.plot([xln,xln],[min(crc_tumor.T[mirna].values),max(crc_tumor.T[mirna].values)],'k-',linewidth=lw,alpha=al)
    for ycn in crc_tumor.T[mirna].values:
        ax.plot([min(crc_normal.T[mirna].values),max(crc_normal.T[mirna].values)],[ycn,ycn],'k-',linewidth=lw,alpha=al)
    #prepare subplot for boxplot and beeswarm plot
    ax2=fig.add_axes([0.61, 0.3, 0.35, 0.615])
    ax2.boxplot([crc_normal.T[mirna].values,
                crc_tumor.T[mirna].values],showmeans=True,meanline=True,
                labels=['Colon benign\n N='+str(int(mirnalist.T[mirna][7])),
                        'Colon malign\n N='+str(int(mirnalist.T[mirna][8]))])
    def GetColor(x):
        colors = []
        for item in x.index:
            coh=sampleinfo['paper'][sampleinfo['sample']==item].values[0]
            if coh == 'fromm': colors.append('red')
            if coh == 'schee':colors.append('blue')
            if coh == 'neerincx':colors.append('green')
            if coh == 'selitsky':colors.append('yellow')
        colors=np.array(colors)
        dat=x.values
        inds = dat.argsort()
        sorteddatcol = colors[inds]
        colors=sorteddatcol.tolist()
        return colors
    colors = (GetColor(crc_normal.T[mirna]) + GetColor(crc_tumor.T[mirna]))
    beeswarm([np.copy(crc_normal.T[mirna].values),
              np.copy(crc_tumor.T[mirna].values)],
              ax=ax2,s=10,alpha=0.4,col=colors,positions=[1,2])
    red_patch = Patch(color='red', label='Fromm')
    blue_patch =Patch(color='blue', label='Schee')
    green_patch = Patch(color='green', label='Neerincx')
    yellow_patch = Patch(color='yellow', label='Selitsky')
    ax2.legend(handles=[red_patch,blue_patch,green_patch,yellow_patch],fontsize='small')
    
    ax3=fig.add_axes([0.61, 0.14, 0.35, 0.1])
    ax3.plot([1,1,2,2],[1.5,1,1,1.5],'k')
    ax3.text(1.5,0.3,'FC = %.2f' % Decimal(str(mirnalist.T[mirna][4]))+', p = %.2e' % Decimal(str(mirnalist.T[mirna][0])),ha='center')
    ax3.set_xlim(0.8, 2.2)
    ax3.set_ylim(-1,2)
    ax3.axis('off')
    
    plt.show()
combplotcol(mirnanamelist[4])

Now comes data filtering. The following list consists of miRNA where the total average count of all tissues is higher than 400, the fold change between colon malign and colon benign average values is higher than 2 (or lower than -2) and the t-test probability of these two sample distributions to be equal is smaller than 0.01.

In [7]:
query1='total_counts > 400 and abs(fc_cm_cb) > 2 and p_cm_cb < 0.01 and tissue_mirna==False'
mirnalist.query(query1)
Out[7]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Let-7-P12_5p 4.278984e-08 9.754251e-05 2.463661e-01 3.992346e-03 2.771537 -2.005364 -1.167641 -1.613713 24 101 24 19 10510.605628 False
Hsa-Let-7-P9_5p 3.127130e-07 4.120670e-02 2.209492e-01 5.166213e-07 2.452093 -1.347730 -1.138090 -2.070621 24 101 24 19 4557.507679 False
Hsa-Mir-10-P1b_5p 1.686720e-07 1.056620e-03 1.528002e-11 4.396471e-03 -2.055630 -2.603610 -25.824510 -4.825943 24 101 24 19 101592.283526 False
Hsa-Mir-103-P1-2_3p 9.244116e-12 1.165269e-01 4.348665e-08 4.818223e-01 2.232835 -1.155588 1.810368 -1.067277 24 101 24 19 13225.097042 False
Hsa-Mir-103-P3_3p 1.060049e-11 1.025207e-01 1.784214e-07 3.254415e-01 2.233893 -1.163499 1.751143 -1.096390 24 101 24 19 12807.600724 False
Hsa-Mir-1247_5p 9.335052e-03 1.395349e-02 6.485372e-02 5.919366e-04 4.383886 1.948639 1.803901 -4.735408 24 101 24 19 422.222374 False
Hsa-Mir-128-P1-2_3p 1.005155e-07 5.518567e-01 2.189641e-03 4.101466e-02 2.420503 1.080901 1.713078 -1.527242 24 101 24 19 632.796052 False
Hsa-Mir-130-P1b_3p 1.115361e-09 8.454416e-01 2.868696e-02 1.260949e-03 2.483067 -1.022651 1.348299 -1.800788 24 101 24 19 570.390175 False
Hsa-Mir-130-P2a_3p 1.790073e-09 1.884853e-02 3.543146e-03 1.361597e-07 3.633490 -1.448453 -1.363251 -3.419637 24 101 24 19 759.853278 False
Hsa-Mir-133-P1-2_3p 3.328335e-06 2.296974e-02 1.253967e-03 9.973500e-04 -3.559779 -2.431852 -21.211396 -2.450556 24 101 24 19 543.051445 False
Hsa-Mir-133-P3_3p 3.417998e-06 2.256880e-02 1.284160e-03 1.128420e-03 -3.567060 -2.448525 -21.325184 -2.441933 24 101 24 19 529.389798 False
Hsa-Mir-15-P1c_5p 4.891876e-10 7.683181e-01 5.355151e-01 5.693768e-03 -2.235494 1.044032 -1.121931 1.908528 24 101 24 19 744.339531 False
Hsa-Mir-15-P1d_5p 5.777811e-08 2.363036e-01 5.517137e-07 6.478118e-01 7.559291 1.368139 8.352805 -1.238151 24 101 24 19 802.596921 False
Hsa-Mir-15-P2c_5p 1.401100e-13 3.143865e-01 2.902290e-01 1.933406e-04 -2.339804 -1.166930 -1.173226 2.327302 24 101 24 19 1499.707484 False
Hsa-Mir-17-P1a_5p 3.788798e-11 2.078057e-01 4.401163e-03 2.453969e-10 4.732212 -1.189342 1.324840 -3.003141 24 101 24 19 2132.453682 False
Hsa-Mir-17-P3a_5p 6.620877e-10 2.600803e-02 3.147237e-04 1.834353e-08 5.332901 -1.455322 1.452368 -2.522961 24 101 24 19 3403.781091 False
Hsa-Mir-17-P4_5p 1.118859e-12 1.085859e-04 9.378608e-02 6.146977e-07 3.427334 -1.699738 -1.255617 -2.531738 24 101 24 19 708.871234 False
Hsa-Mir-17-P5_5p 3.287940e-14 3.328402e-01 8.866469e-03 1.081888e-08 3.074758 -1.104837 -1.256473 -3.496644 24 101 24 19 4824.318329 False
Hsa-Mir-181-P1c_5p 1.160667e-09 7.459491e-01 1.779322e-09 3.364880e-08 3.709771 -1.046605 -1.991147 -7.057341 24 101 24 19 3483.269771 False
Hsa-Mir-181-P2a-b_5p 5.222361e-05 9.570454e-01 4.215286e-01 4.199452e-06 2.189437 -1.008301 -1.084781 -2.355452 24 101 24 19 3150.137285 False
Hsa-Mir-181-P2c_5p 1.361029e-09 1.451820e-01 4.568812e-07 2.835075e-09 4.300938 1.217964 -1.939446 -10.158735 24 101 24 19 425.058685 False
Hsa-Mir-188-P2_5p 2.284991e-06 6.539348e-01 2.982747e-03 8.362105e-10 2.481229 1.063735 -1.444504 -3.812490 24 101 24 19 2178.671120 False
Hsa-Mir-19-P1_3p 4.418713e-13 7.317838e-01 2.403434e-03 9.067292e-04 5.157602 -1.046291 2.105632 -2.340982 24 101 24 19 1008.450246 False
Hsa-Mir-19-P2a-b_3p 6.405825e-11 2.545342e-01 1.176468e-04 7.589743e-04 3.736285 1.147207 2.251508 -1.903707 24 101 24 19 3828.229142 False
Hsa-Mir-192-P2_5p 1.237927e-19 1.550882e-02 2.809846e-06 3.053637e-01 -2.626522 1.343741 -1.765132 1.107368 24 101 24 19 178860.775452 False
Hsa-Mir-196-P3_5p 5.221004e-04 1.620503e-01 6.111699e-12 3.227897e-05 2.435669 1.321542 -44.076675 -141.737041 24 101 24 19 1980.426341 False
Hsa-Mir-199-P1-2-3_3p 3.466219e-07 1.021811e-01 2.195741e-02 1.292268e-01 2.181642 -1.262153 1.282906 -1.347304 24 101 24 19 16296.458756 False
Hsa-Mir-203_3p 6.663538e-06 9.536963e-01 2.832958e-11 1.501375e-08 2.842140 -1.009760 -5.470596 -15.396225 24 101 24 19 4886.932364 False
Hsa-Mir-21_5p 3.110046e-22 5.960336e-02 1.072145e-02 8.971108e-10 4.116444 -1.182244 -1.418580 -4.939105 24 101 24 19 204087.931348 False
Hsa-Mir-221-P1_3p 8.328585e-09 1.717636e-01 1.273383e-09 1.007646e-09 3.008089 -1.214172 -4.418525 -10.945970 24 101 24 19 5080.899114 False
Hsa-Mir-221-P2_3p 4.834707e-07 7.033773e-01 2.473466e-10 5.213585e-05 3.126733 1.067485 -3.574672 -11.930331 24 101 24 19 3366.786638 False
Hsa-Mir-224_5p 2.675269e-06 9.976988e-01 8.516037e-01 7.164322e-07 10.575378 -1.000624 -1.055253 -11.151496 24 101 24 19 745.649985 False
Hsa-Mir-29-P1a_3p 6.129891e-11 7.558155e-01 4.846621e-02 2.831311e-04 2.581402 -1.034696 1.284364 -1.942415 24 101 24 19 9394.155138 False
Hsa-Mir-29-P2a-b_3p 8.443797e-09 4.315107e-02 7.607387e-01 9.012994e-05 3.476083 -1.386343 -1.052221 -2.638236 24 101 24 19 852.408217 False
Hsa-Mir-335_5p 1.981514e-07 5.831623e-07 1.048786e-08 2.262318e-02 2.154496 1.801416 2.605036 -1.489840 24 101 24 19 562.974834 False
Hsa-Mir-34-P1_5p 6.488821e-09 1.397899e-01 4.522448e-02 9.830639e-02 2.157778 -1.184564 1.364736 -1.334715 24 101 24 19 783.639167 False
Hsa-Mir-340_5p 1.485151e-11 9.727197e-05 8.673874e-11 4.575451e-06 2.393059 -1.576700 3.157430 2.080350 24 101 24 19 2004.391485 False
Hsa-Mir-374-P1_3p 1.457710e-11 7.596043e-02 1.371234e-04 4.491778e-01 2.380562 -1.202316 1.773998 -1.116086 24 101 24 19 726.136701 False
Hsa-Mir-375_3p 3.237582e-13 4.088739e-02 1.169930e-10 1.590989e-03 -3.395363 1.651214 -6.513810 -3.167758 24 101 24 19 26273.634906 False
Hsa-Mir-455_5p 9.906337e-07 9.275660e-01 8.123166e-16 5.062153e-10 2.098042 1.011512 7.164219 3.375854 24 101 24 19 413.429457 False
Hsa-Mir-769_5p 9.619912e-09 9.513256e-02 6.854821e-01 8.544618e-06 2.547941 -1.239737 1.042913 -1.970596 24 101 24 19 983.373304 False
Hsa-Mir-8-P3a_3p 2.634176e-05 8.103155e-02 2.488830e-13 8.552498e-09 2.115276 -1.333259 -17.500731 -27.762487 24 101 24 19 4743.783987 False
Hsa-Mir-92-P1a-b_3p 1.482204e-10 3.971032e-05 2.417247e-10 1.116509e-01 2.908213 1.523857 3.579864 -1.237937 24 101 24 19 150661.223131 False
Hsa-Mir-92-P2_3p 1.563559e-10 7.566666e-02 5.120908e-03 1.258990e-04 2.616545 -1.225318 1.335399 -1.599029 24 101 24 19 7717.722419 False
Hsa-Mir-92-P3_3p 1.243859e-07 8.175276e-02 3.691214e-07 4.146636e-05 2.160932 -1.271421 -2.351091 -3.995845 24 101 24 19 3148.896582 False
Hsa-Mir-95-P2_3p 1.461077e-08 6.134214e-01 2.673021e-01 4.541045e-08 3.747711 1.073920 1.119831 -3.593931 24 101 24 19 498.506395 False
Hsa-Mir-96-P2_5p 9.956813e-09 4.110105e-01 9.927814e-11 4.879102e-11 5.829135 1.134147 -5.301387 -35.037551 24 101 24 19 21910.837825 False
Hsa-Mir-96-P3_5p 2.421587e-06 6.540508e-02 1.555623e-06 3.835579e-08 4.361454 1.369243 -8.215654 -49.042943 24 101 24 19 1998.801728 False

Now all these are plotted:

In [8]:
for item in list(mirnalist.query(query1).index):
    combplotcol(item)

Now we are interested in the miRNA where both ellipses are different sides of the FC=1 straight green line, i.e. where the liver malign-colon malign ratio and the liver benign-colon malign ratio are both larger than 1 or both smaller than -1. In order to exclude cases that center around FC=1, higher cutoffs of 1.5 and -1.5, respectively, have been chosen.

As an additional filter, first come the ones where the change of colon malign to liver malign follow the same trend as liver benign to liver malign.

In [9]:
fco=1.5 #cutoff
query2='total_counts > 400 and tissue_mirna==False and ((fc_lm_cm < %f and fc_lb_cb > 1) or (fc_lm_cm > %f and fc_lb_cb < -1) or (fc_lm_cm < -1 and fc_lb_cb > %f) or (fc_lm_cm > 1 and fc_lb_cb < %f)) and fc_lm_cm*fc_lb_lm>0' % (-fco,fco,fco,-fco)
mirnalist.query(query2)
Out[9]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Mir-103-P1-2_3p 9.244116e-12 0.116527 4.348665e-08 0.481822 2.232835 -1.155588 1.810368 -1.067277 24 101 24 19 13225.097042 False
Hsa-Mir-103-P3_3p 1.060049e-11 0.102521 1.784214e-07 0.325442 2.233893 -1.163499 1.751143 -1.096390 24 101 24 19 12807.600724 False
Hsa-Mir-19-P1_3p 4.418713e-13 0.731784 2.403434e-03 0.000907 5.157602 -1.046291 2.105632 -2.340982 24 101 24 19 1008.450246 False
Hsa-Mir-192-P2_5p 1.237927e-19 0.015509 2.809846e-06 0.305364 -2.626522 1.343741 -1.765132 1.107368 24 101 24 19 178860.775452 False
Hsa-Mir-214_3p 2.029039e-05 0.915933 1.038462e-04 0.690395 1.990722 -1.015026 1.827285 -1.073292 24 101 24 19 510.046670 False
Hsa-Mir-31_5p 1.439426e-02 0.053782 2.005683e-01 0.020324 111.855620 -8.027668 1.330055 -10.474140 24 101 24 19 546.766822 False
Hsa-Mir-374-P1_3p 1.457710e-11 0.075960 1.371234e-04 0.449178 2.380562 -1.202316 1.773998 -1.116086 24 101 24 19 726.136701 False

Now all these are plotted:

In [10]:
for item in list(mirnalist.query(query2).index):
    combplot(item)

Now come the ones where the change of colon malign to liver malign do not follow the same trend as liver benign to liver malign.

In [11]:
fco=1.5 #cutoff
query12='total_counts > 400 and tissue_mirna==False and ((fc_lm_cm < %f and fc_lb_cb > 1) or (fc_lm_cm > %f and fc_lb_cb < -1) or (fc_lm_cm < -1 and fc_lb_cb > %f) or (fc_lm_cm > 1 and fc_lb_cb < %f)) and fc_lm_cm*fc_lb_lm<0' % (-fco,fco,fco,-fco)
mirnalist.query(query12)
Out[11]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Mir-10-P1a_5p 1.123321e-01 3.522856e-04 1.377377e-08 1.439242e-06 1.287759 1.715797 -2.583571 -5.708308 24 101 24 19 320447.827049 False
Hsa-Mir-10-P2a_5p 7.346946e-02 1.971320e-01 1.423196e-07 1.653406e-05 1.909509 -1.626276 2.706157 2.304796 24 101 24 19 5056.673341 False
Hsa-Mir-10-P2b_5p 2.364094e-01 9.676175e-01 4.416225e-18 6.562690e-15 1.260039 -1.008161 11.021630 8.818529 24 101 24 19 1198.984170 False
Hsa-Mir-10-P2c_5p 5.423693e-02 5.658453e-01 6.317651e-03 6.301471e-02 -1.364121 1.114067 -1.791083 -1.462747 24 101 24 19 5997.977207 False
Hsa-Mir-130-P1a_3p 2.119808e-02 7.711577e-01 1.351304e-11 1.018979e-06 1.260758 -1.033152 2.543930 2.084694 24 101 24 19 1674.359571 False
Hsa-Mir-1307_5p 3.786464e-03 8.687033e-04 8.050305e-02 3.167021e-02 -1.547311 1.698105 -1.409428 -1.546759 24 101 24 19 1837.650765 False
Hsa-Mir-1307_3p 2.720807e-01 2.861507e-02 4.260915e-03 2.904797e-04 1.131723 1.303514 -1.504429 -2.219344 24 101 24 19 408.799052 False
Hsa-Mir-146-P2_5p 1.289717e-02 1.383255e-02 4.311337e-01 2.437215e-01 2.192985 -2.515165 1.225983 1.406132 24 101 24 19 13493.836423 False
Hsa-Mir-181-P2c_5p 1.361029e-09 1.451820e-01 4.568812e-07 2.835075e-09 4.300938 1.217964 -1.939446 -10.158735 24 101 24 19 425.058685 False
Hsa-Mir-192-P1_5p 3.451970e-08 1.915282e-01 6.666351e-05 4.444130e-01 -1.629050 1.145835 -1.536309 -1.080590 24 101 24 19 640180.597836 False
Hsa-Mir-194-P1_5p 2.190417e-10 1.126259e-01 1.950137e-05 2.718341e-01 -1.806130 1.188422 -1.747133 -1.149589 24 101 24 19 26721.933682 False
Hsa-Mir-194-P2_5p 2.040047e-10 1.128760e-01 1.896760e-05 2.723713e-01 -1.808575 1.188411 -1.749292 -1.149442 24 101 24 19 26661.639129 False
Hsa-Mir-196-P3_5p 5.221004e-04 1.620503e-01 6.111699e-12 3.227897e-05 2.435669 1.321542 -44.076675 -141.737041 24 101 24 19 1980.426341 False
Hsa-Mir-210_3p 9.974818e-03 4.112145e-12 2.018222e-03 1.263763e-09 1.567006 2.546363 -1.632628 -6.514139 24 101 24 19 1016.723133 False
Hsa-Mir-22-P1_3p 1.182445e-03 3.627392e-01 2.400193e-16 6.657972e-11 1.390570 -1.104226 3.442470 2.733632 24 101 24 19 136007.371125 False
Hsa-Mir-221-P2_3p 4.834707e-07 7.033773e-01 2.473466e-10 5.213585e-05 3.126733 1.067485 -3.574672 -11.930331 24 101 24 19 3366.786638 False
Hsa-Mir-30-P1b_5p 1.646774e-05 4.688387e-09 5.047438e-09 1.558030e-10 1.450899 -1.925445 1.979427 2.626889 24 101 24 19 22479.979529 False
Hsa-Mir-30-P1c_5p 2.701287e-06 5.897310e-03 1.786526e-11 1.083095e-04 1.611302 -1.349631 1.845339 1.545682 24 101 24 19 29943.453711 False
Hsa-Mir-30-P2a-b_5p 2.749601e-01 2.196942e-02 4.994954e-06 1.075388e-05 1.107028 -1.299139 2.584647 3.033219 24 101 24 19 5781.923736 False
Hsa-Mir-30-P2c_5p 1.402912e-02 1.240077e-01 5.784029e-06 8.913326e-04 1.378471 -1.243432 1.762633 1.589980 24 101 24 19 5257.892699 False
Hsa-Mir-340_5p 1.485151e-11 9.727197e-05 8.673874e-11 4.575451e-06 2.393059 -1.576700 3.157430 2.080350 24 101 24 19 2004.391485 False
Hsa-Mir-375_3p 3.237582e-13 4.088739e-02 1.169930e-10 1.590989e-03 -3.395363 1.651214 -6.513810 -3.167758 24 101 24 19 26273.634906 False
Hsa-Mir-425_5p 1.100232e-04 1.043674e-05 1.783155e-06 2.409169e-09 1.503733 1.537318 -2.019325 -4.667983 24 101 24 19 2005.675719 False
Hsa-Mir-8-P1b_3p 1.760338e-02 6.165978e-05 2.467503e-11 2.115852e-10 -1.337234 1.687100 -53.351890 -67.300262 24 101 24 19 21636.963537 False
Hsa-Mir-96-P2_5p 9.956813e-09 4.110105e-01 9.927814e-11 4.879102e-11 5.829135 1.134147 -5.301387 -35.037551 24 101 24 19 21910.837825 False
Hsa-Mir-96-P3_5p 2.421587e-06 6.540508e-02 1.555623e-06 3.835579e-08 4.361454 1.369243 -8.215654 -49.042943 24 101 24 19 1998.801728 False
In [12]:
for item in list(mirnalist.query(query12).index):
    combplot(item)

Now the ones where the ellipses are on the same side, i.e. the selected miRNA is expressed stronger in one specific tissue, regardless of malign or benign. Additionally, the relative change of liver expression should go in the opposite direction such that liver remnants alone cannot be the reason for the observed changes.

In [13]:
fco=1.5 #cutoff value
query3='total_counts > 400 and tissue_mirna==0 and ((fc_lm_cm > %f and fc_lb_cb > 1 and fc_lb_lm > 1) or (fc_lm_cm < %f and fc_lb_cb < -1 and fc_lb_lm < 1) or (fc_lm_cm > 1 and fc_lb_cb > %f and fc_lb_lm > 1) or (fc_lm_cm < -1 and fc_lb_cb < %f and fc_lb_lm < 1))' % (fco,-fco,fco,-fco)
mirnalist.query(query3)
Out[13]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Let-7-P12_5p 4.278984e-08 9.754251e-05 2.463661e-01 3.992346e-03 2.771537 -2.005364 -1.167641 -1.613713 24 101 24 19 10510.605628 False
Hsa-Mir-10-P1b_5p 1.686720e-07 1.056620e-03 1.528002e-11 4.396471e-03 -2.055630 -2.603610 -25.824510 -4.825943 24 101 24 19 101592.283526 False
Hsa-Mir-10-P3a_5p 1.952070e-04 1.203257e-04 2.985387e-01 7.750291e-01 -1.638494 1.843955 1.196116 1.062857 24 101 24 19 7152.232348 False
Hsa-Mir-10-P3b-c_5p 2.163696e-02 1.577741e-05 4.070701e-10 4.395448e-07 -1.472144 2.111113 4.664502 3.252749 24 101 24 19 4392.318023 False
Hsa-Mir-101-P1-2_3p 9.622964e-03 8.965294e-01 3.370908e-09 5.898246e-07 1.225938 1.010537 3.905932 3.152855 24 101 24 19 23376.515988 False
Hsa-Mir-130-P4a_3p 8.640889e-08 4.338700e-02 7.069612e-04 1.805019e-07 1.764204 -1.217227 -1.549175 -2.245275 24 101 24 19 415.564935 False
Hsa-Mir-132-P1_3p 4.935832e-04 1.277487e-01 4.443287e-03 1.947944e-04 1.634114 -1.235482 -1.827610 -2.417251 24 101 24 19 408.878213 False
Hsa-Mir-133-P1-2_3p 3.328335e-06 2.296974e-02 1.253967e-03 9.973500e-04 -3.559779 -2.431852 -21.211396 -2.450556 24 101 24 19 543.051445 False
Hsa-Mir-133-P3_3p 3.417998e-06 2.256880e-02 1.284160e-03 1.128420e-03 -3.567060 -2.448525 -21.325184 -2.441933 24 101 24 19 529.389798 False
Hsa-Mir-148-P1_3p 1.153669e-03 7.680352e-01 7.866799e-16 9.428689e-10 1.627490 1.042447 5.175744 3.050705 24 101 24 19 164524.404618 False
Hsa-Mir-148-P3_3p 6.326702e-07 2.986384e-02 3.863244e-10 1.251173e-10 -1.626844 1.287631 2.153609 2.720999 24 101 24 19 733.403551 False
Hsa-Mir-154-P23_3p 5.159606e-03 7.571064e-01 7.350122e-08 6.396568e-02 1.480628 1.043737 2.036196 1.317597 24 101 24 19 479.858049 False
Hsa-Mir-155_5p 7.347544e-02 5.217519e-01 1.533595e-03 1.893181e-04 1.348580 -1.115232 -2.347524 -2.838667 24 101 24 19 1321.752577 False
Hsa-Mir-17-P4_5p 1.118859e-12 1.085859e-04 9.378608e-02 6.146977e-07 3.427334 -1.699738 -1.255617 -2.531738 24 101 24 19 708.871234 False
Hsa-Mir-181-P1c_5p 1.160667e-09 7.459491e-01 1.779322e-09 3.364880e-08 3.709771 -1.046605 -1.991147 -7.057341 24 101 24 19 3483.269771 False
Hsa-Mir-190-P1_5p 1.352768e-07 5.980554e-02 8.658638e-10 5.022357e-08 -1.933038 -1.381289 -12.921392 -4.839549 24 101 24 19 444.166756 False
Hsa-Mir-193-P1b_3p 2.458750e-05 2.619620e-01 8.538984e-16 3.873775e-09 1.863837 1.149528 6.074130 2.835024 24 101 24 19 753.539256 False
Hsa-Mir-196-P1_5p 1.298715e-02 1.548384e-01 2.345040e-10 1.300915e-08 1.446003 -1.251537 -81.884326 -94.594433 24 101 24 19 680.545631 False
Hsa-Mir-196-P2_5p 1.172808e-02 1.477113e-01 2.511455e-10 1.353987e-08 1.454643 -1.256669 -81.738178 -94.601766 24 101 24 19 685.221197 False
Hsa-Mir-197_3p 1.764366e-01 5.450440e-02 2.621390e-02 4.557850e-01 1.143220 1.271760 1.791358 1.232103 24 101 24 19 734.676535 False
Hsa-Mir-203_3p 6.663538e-06 9.536963e-01 2.832958e-11 1.501375e-08 2.842140 -1.009760 -5.470596 -15.396225 24 101 24 19 4886.932364 False
Hsa-Mir-221-P1_3p 8.328585e-09 1.717636e-01 1.273383e-09 1.007646e-09 3.008089 -1.214172 -4.418525 -10.945970 24 101 24 19 5080.899114 False
Hsa-Mir-26-P1-2_5p 3.613054e-09 3.664759e-09 2.044199e-01 2.540657e-01 -1.514441 1.530483 1.142961 1.130997 24 101 24 19 166816.092197 False
Hsa-Mir-26-P3_5p 2.600953e-01 4.388321e-01 1.909049e-10 6.501349e-09 -1.063564 1.049076 2.358544 2.391143 24 101 24 19 19735.017412 False
Hsa-Mir-27-P1_3p 2.442735e-01 8.444223e-01 2.787528e-11 2.911006e-07 1.085990 1.015435 1.764812 1.600370 24 101 24 19 105196.434026 False
Hsa-Mir-27-P2_3p 2.477911e-01 8.437290e-01 8.743815e-12 1.212822e-07 1.085863 1.015599 1.790951 1.624001 24 101 24 19 107362.051426 False
Hsa-Mir-30-P1a_5p 3.724232e-05 8.297463e-01 2.473499e-15 3.488121e-14 -1.397255 1.023661 3.112152 4.248018 24 101 24 19 20463.565699 False
Hsa-Mir-423_5p 2.814707e-02 6.353657e-05 4.484185e-03 3.715941e-01 1.256256 1.775282 3.006562 1.348108 24 101 24 19 2015.415458 False
Hsa-Mir-455_5p 9.906337e-07 9.275660e-01 8.123166e-16 5.062153e-10 2.098042 1.011512 7.164219 3.375854 24 101 24 19 413.429457 False
Hsa-Mir-574_3p 2.989024e-01 3.256953e-02 1.237381e-03 6.282096e-03 -1.132192 1.273945 2.357376 2.095091 24 101 24 19 1264.459867 False
Hsa-Mir-8-P1a_3p 6.097012e-01 4.507897e-01 2.252928e-13 3.599055e-11 1.055667 -1.095576 -15.763026 -15.188735 24 101 24 19 4211.854274 False
Hsa-Mir-8-P2a_3p 5.167330e-03 5.436831e-02 5.382520e-15 5.533294e-09 1.511660 -1.366734 -21.508600 -23.788459 24 101 24 19 21770.916700 False
Hsa-Mir-8-P2b_3p 3.267946e-02 4.182001e-01 7.100881e-15 2.598245e-09 1.227154 -1.093513 -77.777828 -87.274066 24 101 24 19 6371.959139 False
Hsa-Mir-8-P3a_3p 2.634176e-05 8.103155e-02 2.488830e-13 8.552498e-09 2.115276 -1.333259 -17.500731 -27.762487 24 101 24 19 4743.783987 False
Hsa-Mir-92-P3_3p 1.243859e-07 8.175276e-02 3.691214e-07 4.146636e-05 2.160932 -1.271421 -2.351091 -3.995845 24 101 24 19 3148.896582 False
In [14]:
for item in list(mirnalist.query(query3).index):
    combplot(item)

Now come the ones, where the relative change in miRNA expression in liver tissue has the same trend and could be the reason for the observed shift in expression.

In [15]:
fco=1.5 #cutoff value
query4='total_counts > 400 and tissue_mirna==False and ((fc_lm_cm > %f and fc_lb_cb > 1 and fc_lb_lm < 1) or (fc_lm_cm < %f and fc_lb_cb < -1 and fc_lb_lm > 1) or (fc_lm_cm > 1 and fc_lb_cb > %f and fc_lb_lm < 1) or (fc_lm_cm < -1 and fc_lb_cb < %f and fc_lb_lm > 1))' % (fco,-fco,fco,-fco)
mirnalist.query(query4)
Out[15]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Mir-1247_5p 9.335052e-03 1.395349e-02 6.485372e-02 0.000592 4.383886 1.948639 1.803901 -4.735408 24 101 24 19 422.222374 False
Hsa-Mir-128-P1-2_3p 1.005155e-07 5.518567e-01 2.189641e-03 0.041015 2.420503 1.080901 1.713078 -1.527242 24 101 24 19 632.796052 False
Hsa-Mir-146-P1_5p 1.798215e-02 1.139204e-03 4.479669e-02 0.714692 1.941192 -3.939324 -1.791190 1.132976 24 101 24 19 3693.884900 False
Hsa-Mir-15-P1d_5p 5.777811e-08 2.363036e-01 5.517137e-07 0.647812 7.559291 1.368139 8.352805 -1.238151 24 101 24 19 802.596921 False
Hsa-Mir-15-P2a_5p 1.818566e-05 4.566836e-07 8.419748e-01 0.489214 -1.541728 1.699843 1.022415 -1.078357 24 101 24 19 19836.324761 False
Hsa-Mir-15-P2b_5p 1.835074e-05 4.588182e-07 8.414001e-01 0.488434 -1.541591 1.700067 1.022492 -1.078513 24 101 24 19 19839.665945 False
Hsa-Mir-19-P2a-b_3p 6.405825e-11 2.545342e-01 1.176468e-04 0.000759 3.736285 1.147207 2.251508 -1.903707 24 101 24 19 3828.229142 False
Hsa-Mir-204-P1_5p 8.324290e-01 1.316908e-02 3.419039e-10 0.587860 -1.109424 8.002327 4.409997 -1.635568 24 101 24 19 445.085294 False
Hsa-Mir-28-P2_5p 1.572851e-01 1.597634e-03 2.130294e-04 0.692585 1.152443 1.378969 1.512645 -1.050588 24 101 24 19 7734.376074 False
Hsa-Mir-335_5p 1.981514e-07 5.831623e-07 1.048786e-08 0.022623 2.154496 1.801416 2.605036 -1.489840 24 101 24 19 562.974834 False
Hsa-Mir-345_5p 1.546017e-03 1.369967e-01 3.706329e-07 0.068191 1.710834 1.230456 1.673795 -1.257669 24 101 24 19 525.285787 False
Hsa-Mir-361_3p 4.552262e-06 2.007205e-13 2.372497e-01 0.385082 -1.620208 2.295302 1.222154 -1.159127 24 101 24 19 418.987759 False
Hsa-Mir-92-P1a-b_3p 1.482204e-10 3.971032e-05 2.417247e-10 0.111651 2.908213 1.523857 3.579864 -1.237937 24 101 24 19 150661.223131 False
Hsa-Mir-941-P1-2-3-4-5_3p 8.354805e-01 5.610260e-05 2.795811e-01 0.016214 1.041560 2.205654 1.168120 -1.966644 24 101 24 19 975.495259 False
In [16]:
for item in list(mirnalist.query(query4).index):
    combplot(item)

These are the tissue related miRNAs:

In [17]:
query5='tissue_mirna==True'
mirnalist.query(query5)
Out[17]:
p_cm_cb p_cm_lm p_cb_lb p_lm_lb fc_cm_cb fc_lm_cm fc_lb_cb fc_lb_lm N_cb N_cm N_lb N_lm total_counts tissue_mirna
Hsa-Mir-122_5p 0.227864 4.728730e-07 1.283780e-15 7.696526e-13 -2.290989 243.423080 4146.904083 39.029691 24 101 24 19 140249.292413 True
Hsa-Mir-126_5p 0.464138 9.653319e-01 9.179258e-09 5.261463e-08 -1.098584 1.006320 3.096289 3.380209 24 101 24 19 18095.135373 True
Hsa-Mir-126_3p 0.642972 1.868090e-01 4.680241e-05 4.502764e-05 1.083273 -1.307221 2.788224 3.364683 24 101 24 19 6564.227964 True
Hsa-Mir-142-P1_5p 0.567639 2.155522e-01 5.343311e-01 8.719778e-01 1.077186 -1.224241 -1.098395 1.034709 24 101 24 19 11781.636882 True
Hsa-Mir-143_3p 0.518025 5.420196e-04 6.750566e-05 3.475633e-04 -1.100111 -2.006400 -4.585111 -2.077271 24 101 24 19 480648.499331 True
Hsa-Mir-144_5p 0.966461 4.959433e-02 3.793302e-06 6.752987e-07 1.008751 -1.831029 2.890922 5.247536 24 101 24 19 290.478114 True
Hsa-Mir-144_3p 0.521683 2.106276e-02 5.708755e-03 4.624680e-05 -1.162003 -2.456118 2.194771 6.264142 24 101 24 19 521.348376 True
Hsa-Mir-145_5p 0.000323 7.107014e-01 2.671021e-02 1.845321e-02 -3.062715 -1.076866 -5.946869 -1.803100 24 101 24 19 3959.947096 True
Hsa-Mir-150_5p 0.000119 4.457748e-07 2.771068e-01 7.335270e-01 -2.219040 3.128688 1.645430 1.167057 24 101 24 19 1988.385644 True
Hsa-Mir-223_3p 0.004968 1.786593e-01 3.472559e-03 2.821605e-01 4.245243 -1.704697 1.854494 -1.342817 24 101 24 19 1481.935032 True
Hsa-Mir-486_5p 0.019099 3.454631e-01 7.959206e-05 4.185190e-08 -1.936804 -1.586931 2.535166 7.792293 24 101 24 19 13962.407089 True
In [18]:
for item in list(mirnalist.query(query5).index):
    combplot(item)
In [ ]: